import os

class Config:
    """应用配置类"""
    # Flask配置
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'dev-key-for-smart-agriculture'
    DEBUG = True
    
    # MQTT配置
    MQTT_BROKER_URL = 'iot-06z00ay6q2ji2ib.mqtt.iothub.aliyuncs.com'
    MQTT_BROKER_PORT = 1883
    MQTT_CLIENT_ID = 'k01baZKR6Hv.Mqtt_Py|securemode=2,signmethod=hmacsha256,timestamp=1749290620231|'
    MQTT_USERNAME = 'Mqtt_Py&k01baZKR6Hv'
    MQTT_PASSWORD = '51b000af64e075170caa7b0f9f091a9269e634b5337bc6ddf584908531b901cc'
    
    # 应用配置
    SENSOR_DATA_HISTORY_SIZE = 100  # 保存的传感器数据历史记录数量